package com.atguigu.gmall.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 *
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    SERVICE_ERROR(2012, "服务异常"),
    SKU_INFO_ID_NOT_EXIST(8848,"访问的商品id不存在"),

    PAY_RUN(205, "支付中"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),
    SECKILL_NO_START(210, "秒杀还没开始"),
    SECKILL_RUN(211, "正在排队中"),
    SECKILL_NO_PAY_ORDER(212, "您有未支付的订单"),
    SECKILL_FINISH(213, "已售罄"),
    SECKILL_END(214, "秒杀已结束"),
    SECKILL_SUCCESS(215, "抢单成功"),
    SECKILL_FAIL(216, "抢单失败"),
    SECKILL_ILLEGAL(217, "请求不合法"),
    SECKILL_ORDER_SUCCESS(218, "下单成功"),
    COUPON_GET(220, "优惠券已经领取"),
    COUPON_LIMIT_GET(221, "优惠券已发放完毕"),
    REFUSE_ACCESS(4005, "拒绝访问"),
    CART_EMPTY(4006, "购物车中没有啦，赶快去添加喜欢的商品吧"),
    CART_TEMP_TOO_MUCH(4007, "临时购物车中的数据太多，快去清理吧"),
    LOGIN_NAME_PWD_ERROR(4004,"用户名或者密码错误"),
    CART_ITEM_MAXNUM(4008, "超过购物车容量最大限制,无法添加商品了┭┮﹏┭┮"),
    CART_GOODS_ITEM_MAXNUM(4009,"每件商品的最多只能添加100件，多了就不行奥!" ),

    ORDER_MULTI_SUBMIT(5001,"亲，请勿重复提交订单"),
    ORDER_HAS_NO_STOCK(5002,"选中的商品有些没有库存，请移除该商品再下单。没有库存的商品如下：" ),
    ORDER_PRICE_CHANGE(5003, "订单中的商品价格有变化，请你刷新确认。价格变化的商品如下："),
    ORDER_HAS_SPLIT(5004,"订单已经拆分" );

    private Integer code;

    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
